package com.yang.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author 杨天可
 * @Date 2021/3/15 10:29
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@Table(name = "tb_leave")
public class Leave implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @Column(name = "user_id")
    private Integer userId;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @Column(name = "leave_time")
    private Date leaveTIme;

    @Column(name = "leave_reason")
    private String leaveReason;

    @Column(name = "leave_days")
    private Integer leaveDays;

    @Column(name = "department_header")
    private Integer departmentHeader;

    @Column(name = "is_status")
    private Integer isStatus;
}
